home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-10-22 | 947 b | 40 lines | [TEXT/KAHL] |
- // Copyright: © 1992 by Apple Computer, Inc., all rights reserved.
-
- #include "mtb.h"
-
- void CreateMyCoolMovie (void)
- {
- Point where = {100,100};
- SFReply theSFReply;
- Movie theMovie = nil;
- FSSpec mySpec;
- short resRefNum = 0;
- short resId = 0;
- OSErr err = noErr;
-
- SFPutFile (where, "\pEnter movie file name:",
- "\pMovie File", nil, &theSFReply);
- if (!theSFReply.good) return;
-
- FSMakeFSSpec(theSFReply.vRefNum, 0,
- theSFReply.fName, &mySpec);
-
- err = CreateMovieFile ( &mySpec,
- 'TVOD',
- smCurrentScript,
- createMovieFileDeleteCurFile,
- &resRefNum,
- &theMovie );
- CheckError(err, "\pCreateMovieFile");
-
- CreateMyVideoTrack (theMovie);
- CreateMySoundTrack (theMovie);
-
- err = AddMovieResource (theMovie, resRefNum, &resId,
- theSFReply.fName);
- CheckError(err, "\pAddMovieResource");
-
- if (resRefNum) CloseMovieFile (resRefNum);
- DisposeMovie (theMovie);
- }
-